#include <iostream>
#include <string.h>
using namespace std;

class bint {
  int *digits = nullptr; // low -> high
  int size = 0;
  void reset(int len) {
    if (digits != nullptr) {
      delete[] digits;
      digits = nullptr;
    }
    size = len;
    digits = new int[size];
    memset(digits, 0, sizeof(int) * size);
  }
  void trim() {
    while (size > 1 && digits[ size - 1] == 0) size --;
  }
 public:
  ~bint() {
    if (digits == nullptr) return;
    delete[] digits;
    digits = nullptr;
  }
  bint& operator=(const bint &rhs) {
    reset(rhs.size);
    memcpy(digits, rhs.digits, sizeof(int) * size);
    return *this;
  }
  bint& operator=(const string &rhs) {
    reset(rhs.length());
    for (int i = 0; i < size; i ++) {
      digits[i] = rhs[size - 1 - i] - '0';
    }
    return *this;
  }
  bool operator<(const bint &rhs) {
    if (size != rhs.size) return size < rhs.size;
    for (int i = size - 1; i >= 0; i --) {
      if (digits[i] != rhs.digits[i]) {
        return digits[i] < rhs.digits[i];
      }
    }
    return false;
  }
  bint operator-(const bint &rhs) {
    bint ret;
    ret = *this;
    // 100 1
    // 0 9 9
    for (int i = 0; i < size; i ++) {
      if (i < rhs.size) ret.digits[i] -= rhs.digits[i];
      if (ret.digits[i] < 0) {
        ret.digits[i] += 10;
        ret.digits[i + 1] --;
      }
    }
    ret.trim();
    return ret;
  }
  bint operator+(const bint &rhs) {
    bint ret;
    ret.size = max(size, rhs.size) + 1;
    ret.digits = new int[ret.size];
    for (int i = 0; i < ret.size - 1; i ++) {
      // ret.digits[i] + digits[i] + rhs.digits[i];
      if (i < size) ret.digits[i] += digits[i];
      if (i < rhs.size) ret.digits[i] += rhs.digits[i];
      if (ret.digits[i] >= 10) {
        ret.digits[i] -= 10;
        ret.digits[i + 1] ++;
      }
    }
    ret.trim();
    return ret;
  }
  bint operator*(const bint &rhs) {
    bint ret;
    ret.reset(size + rhs.size);
    for (int i = 0; i < size; i ++) {
      for (int j = 0; j < rhs.size; j ++) {
        ret.digits[i + j] += digits[i] * rhs.digits[j];
      }
    }
    for (int i = 0; i < ret.size - 1; i ++) {
      if (ret.digits[i] >= 10) {
        ret.digits[i + 1] += ret.digits[i] / 10;
        ret.digits[i] %= 10;
      }
    }
    ret.trim();
    return ret;
  }
  bint operator/(int rhs) {
    bint ret;
    ret.reset(size);
    long long remain = 0; 
    for (int i = size - 1; i >= 0; i--) {
      remain = remain * 10 + digits[i];
      ret.digits[i] = remain / rhs;
      remain %= rhs;
    }
    ret.trim();
    return ret;
  }
  friend istream& operator>>(istream &lhs, bint &rhs) {
    string str;
    lhs >> str;
    rhs = str;
    return lhs;
  }
  friend ostream& operator<<(ostream &lhs, const bint &rhs) {
    for (int i = rhs.size - 1; i >= 0; i --) {
      lhs << rhs.digits[i];
    }
    return lhs;
  }
};
int main() {
  bint a;
  int b;
  cin >> a >> b;
  cout << a / b << endl;
}

// abc len1
// def len2  len1 + len2
//
//       af bf cf
//    bd be bf
// ad ae af
// 


//          b/a  (b%a*10+c)/a    (x*10+d)/a
//  a   /   b       c             d           e
//          b%a*10+c
//                  x